<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vuejs测试</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        {{msg}}
    </div>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                msg: ""
            },
            // 钩子函数
            created() {
                // this表示vue实例
                this.msg = "Hello vue. created.";
                console.log(this)
            }
        });
    </script>
</body>
</html>